<div id="pageoptions">
    <%= link_to "< back to story", {# link_to options
            :controller => 'story',
            :action => 'view',
            :id => @story_id} %>
</div>
<%= error_messages_for 'sharing' %>

<div class="sectionwrap">
    <% form_for :sharing, :url => { :story_id => @story_id } do |form| %>
        <% for borrower in @borrowers %>
            <input id="sharing_user_id" name="user_ids[]" value="<%= borrower.user_id %>" <%= if @sharedstories.include?(borrower.user_id.to_i) then " checked " end %>type="checkbox"> <%= "#{borrower.first_name} #{borrower.last_name} (#{borrower.login})"  %><br/>
        <% end %>
        <br/>
        <%= submit_tag "Update Sharing", :class => "submit" %>
        <br/><br/>
    <% end %>
</div>